package com.example.demo;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;


@Service
public class UserService {
    public void say(){
        System.out.println("UserService say");
    }
    @Bean
    public User user1(){
        User user1 = new User();
        user1.setName("1");
        user1.setAge(1);
        user1.setGender("1");
        return user1;
    }
    @Bean
    public User user2(){
        User user2 = new User();
        user2.setName("2");
        user2.setAge(2);
        user2.setGender("2");
        return user2;
    }
}
